<template>
  <quick-layout
    ref="Instance"
    :is-operate-btn="true"
    :is-operate="true"
    :data-list-url="dataListUrl"
    :delete-url="deleteUrl"
    :export-url="exportUrl"
    :import-url="importUrl"
    table-title="环境因素识别明细信息"
    :is-row-model="true"
    label-width="150px"
    size="small"
    @edit="handleEdit"
    @created="handleEdit(null)"
  >
    <template v-slot:query="{query,reset}">
      <query-item label="模糊查询">
        <el-input v-model="query.keyword" style="width: 270px" placeholder="请输入关键词..." />
      </query-item>
      <query-item label="ID" prop="id">
        <el-input v-model="query.id" placeholder="ID" />
      </query-item>
      <query-item label="业务主键" prop="businessKey">
        <el-input v-model="query.businessKey" placeholder="业务主键" />
      </query-item>
      <query-item label="附件ID" prop="attachId">
        <el-input v-model="query.attachId" placeholder="附件ID" />
      </query-item>
      <query-item label="环境因素识别任务信息ID" prop="targetId">
        <el-input v-model="query.targetId" placeholder="环境因素识别任务信息ID" />
      </query-item>
      <query-item label="厂房/区域" prop="workshop">
        <el-input v-model="query.workshop" placeholder="厂房/区域" />
      </query-item>
      <query-item label="子单元（系统/设施）" prop="subUnitSystem">
        <el-input v-model="query.subUnitSystem" placeholder="子单元（系统/设施）" />
      </query-item>
      <query-item label="子单元（活动）" prop="subUnitAction">
        <el-input v-model="query.subUnitAction" placeholder="子单元（活动）" />
      </query-item>
      <query-item label="环境因素" prop="envFactor">
        <el-input v-model="query.envFactor" placeholder="环境因素" />
      </query-item>
      <query-item label="时态" prop="tense">
        <el-input v-model="query.tense" placeholder="时态" />
      </query-item>
      <query-item label="状态" prop="status">
        <el-input v-model="query.status" placeholder="状态" />
      </query-item>
      <query-item label="环境影响" prop="evnImpact">
        <el-input v-model="query.evnImpact" placeholder="环境影响" />
      </query-item>
      <query-item label="是否判断法" prop="judgmentMethodType">
        <el-input v-model="query.judgmentMethodType" placeholder="是否判断法" />
      </query-item>
      <query-item label="专家评定法" prop="expertJudgment">
        <el-input v-model="query.expertJudgment" placeholder="专家评定法" />
      </query-item>
      <query-item label="可能性" prop="possibility">
        <el-input v-model="query.possibility" placeholder="可能性" />
      </query-item>
      <query-item label="严重性" prop="severity">
        <el-input v-model="query.severity" placeholder="严重性" />
      </query-item>
      <query-item label="管理迫切性" prop="managementUrgency">
        <el-input v-model="query.managementUrgency" placeholder="管理迫切性" />
      </query-item>
      <query-item label="分值" prop="score">
        <el-input v-model="query.score" placeholder="分值" />
      </query-item>
      <query-item label="风险度" prop="riskDegree">
        <el-input v-model="query.riskDegree" placeholder="风险度" />
      </query-item>
      <query-item label="重要环境因素" prop="importantEvnFactor">
        <el-input v-model="query.importantEvnFactor" placeholder="重要环境因素" />
      </query-item>
      <query-item label="风险策略" prop="riskStrategy">
        <el-input v-model="query.riskStrategy" placeholder="风险策略" />
      </query-item>
      <query-item label="管理策略" prop="manageStrategy">
        <el-input v-model="query.manageStrategy" placeholder="管理策略" />
      </query-item>
      <query-item label="识别部门" prop="identifyDepartment">
        <el-input v-model="query.identifyDepartment" placeholder="识别部门" />
      </query-item>
      <query-item label="识别日期" prop="identifyDate">
        <el-input v-model="query.identifyDate" placeholder="识别日期" />
      </query-item>
      <query-item label="备注" prop="remark">
        <el-input v-model="query.remark" placeholder="备注" />
      </query-item>
      <query-item label="创建人工号" prop="createdUserCode">
        <el-input v-model="query.createdUserCode" placeholder="创建人工号" />
      </query-item>
      <query-item label="创建人姓名" prop="createdUserName">
        <el-input v-model="query.createdUserName" placeholder="创建人姓名" />
      </query-item>
      <query-item label="创建时间" prop="createdTime">
        <el-input v-model="query.createdTime" placeholder="创建时间" />
      </query-item>
      <query-item label="修改人工号" prop="updatedUserCode">
        <el-input v-model="query.updatedUserCode" placeholder="修改人工号" />
      </query-item>
      <query-item label="修改人姓名" prop="updatedUserName">
        <el-input v-model="query.updatedUserName" placeholder="修改人姓名" />
      </query-item>
      <query-item label="修改时间" prop="updatedTime">
        <el-input v-model="query.updatedTime" placeholder="修改时间" />
      </query-item>
      <query-item label="删除标志" prop="delFlag">
        <el-input v-model="query.delFlag" placeholder="删除标志" />
      </query-item>
    </template>
    <template>
      <el-table-column type="selection" header-align="center" align="center" width="50" />
      <el-table-column prop="id" label="ID" header-align="center" align="center" />
      <el-table-column prop="businessKey" label="业务主键" header-align="center" align="center" />
      <el-table-column prop="attachId" label="附件ID" header-align="center" align="center" />
      <el-table-column prop="targetId" label="环境因素识别任务信息ID" header-align="center" align="center" />
      <el-table-column prop="workshop" label="厂房/区域" header-align="center" align="center" />
      <el-table-column prop="subUnitSystem" label="子单元（系统/设施）" header-align="center" align="center" />
      <el-table-column prop="subUnitAction" label="子单元（活动）" header-align="center" align="center" />
      <el-table-column prop="envFactor" label="环境因素" header-align="center" align="center" />
      <el-table-column prop="tense" label="时态" header-align="center" align="center" />
      <el-table-column prop="status" label="状态" header-align="center" align="center" />
      <el-table-column prop="evnImpact" label="环境影响" header-align="center" align="center" />
      <el-table-column prop="judgmentMethodType" label="是否判断法" header-align="center" align="center" />
      <el-table-column prop="expertJudgment" label="专家评定法" header-align="center" align="center" />
      <el-table-column prop="possibility" label="可能性" header-align="center" align="center" />
      <el-table-column prop="severity" label="严重性" header-align="center" align="center" />
      <el-table-column prop="managementUrgency" label="管理迫切性" header-align="center" align="center" />
      <el-table-column prop="score" label="分值" header-align="center" align="center" />
      <el-table-column prop="riskDegree" label="风险度" header-align="center" align="center" />
      <el-table-column prop="importantEvnFactor" label="重要环境因素" header-align="center" align="center" />
      <el-table-column prop="riskStrategy" label="风险策略" header-align="center" align="center" />
      <el-table-column prop="manageStrategy" label="管理策略" header-align="center" align="center" />
      <el-table-column prop="identifyDepartment" label="识别部门" header-align="center" align="center" />
      <el-table-column prop="identifyDate" label="识别日期" header-align="center" align="center" />
      <el-table-column prop="remark" label="备注" header-align="center" align="center" />
      <el-table-column prop="createdUserCode" label="创建人工号" header-align="center" align="center" />
      <el-table-column prop="createdUserName" label="创建人姓名" header-align="center" align="center" />
      <el-table-column prop="createdTime" label="创建时间" header-align="center" align="center" />
      <el-table-column prop="updatedUserCode" label="修改人工号" header-align="center" align="center" />
      <el-table-column prop="updatedUserName" label="修改人姓名" header-align="center" align="center" />
      <el-table-column prop="updatedTime" label="修改时间" header-align="center" align="center" />
      <el-table-column prop="delFlag" label="删除标志" header-align="center" align="center" />
    </template>
    <template #component>
      <add-or-update ref="addOrUpdateRef" @refreshDataList="getDataList" />
    </template>
  </quick-layout>
</template>

<script>
import AddOrUpdate from './add-or-update.vue'
import QuickLayout from '@/components/EmpsLayout/index.vue'
import QueryItem from '@/components/QueryItem/index.vue'

export default {
  name: 'EnvironmentalFactorIdentification',
  components: { QuickLayout, QueryItem, AddOrUpdate },
  data() {
    return {
      dataListUrl: '/business/environmental_factor_identification/page',
      deleteUrl: '/business/environmental_factor_identification',
      exportUrl: '/business/environmental_factor_identification/export',
      importUrl: '/business/environmental_factor_identification/import',
      businessEnum: []
    }
  },
  created() {
    this.getBusinessEnum()
  },
  methods: {
    getInstance() {
      return this.$ref.Instance
    },
    handleEdit(id) {
      this.$refs.addOrUpdateRef.init(id)
    },
    getDataList() {
      this.getInstance().query()
    }
  }
}
</script>
